<?php
/**
 * Created by PhpStorm.
 * User: yyq
 * Date: 2017/3/20
 * Time: 17:19
 */

namespace Wap\Controller;


use Common\Model\ProductModel;
use Think\Controller;

class ProductController extends Controller
{
    private $product_model;

    public function __construct()
    {
        parent::__construct();
        $this->product_model = new ProductModel();
    }

    public function detail() {
        $id = I('get.id');

        $content = $this->product_model->where(['id' => $id])->getField('content');

        $this->assign('content', $content);
        $this->display();
    }
}